<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>会员新增</title>
    <link rel="stylesheet" href="dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="dist/css/laypage.css">
    <script type="text/javascript" src="dist/js/jquery/jquery.min.js"></script>
    <!--<script type="text/javascript" src="dist/js/jquery.validation/1.14.0/jquery.validate.min.js"></script>
    <script type="text/javascript" src="dist/js/jquery.validation/1.14.0/messages_zh.min.js"></script>-->

</head>
<body>
<div id="app" class="container">
    <form id="id-form-insertMember" class="form-inline bg-danger" role="form">
        <div class="form-group">
            <label class="sr-only" for="maccount">账号</label>
            <input name="maccount" type="text" class="form-control" id="maccount" placeholder="账号">
        </div>
        <hr>
        <div class="form-group">
            <label class="sr-only" for="mpwd">密码</label>
            <input name="mpwd" type="text" class="form-control" id="mpwd" placeholder="密码">
        </div>
        <hr>
        <div class="form-group">
            <label class="sr-only" for="mphone">手机号</label>
            <input name="mphone" type="text" class="form-control" id="mphone" placeholder="手机号">
        </div>
        <hr>
        <div class="form-group">
            <label class="sr-only" for="mname">姓名</label>
            <input name="mname" type="text" class="form-control" id="mname" placeholder="姓名">
        </div>
        <hr>
        <div class="form-group">
            <label class="sr-only" for="mpic">头像</label>
            <input name="mpic" type="text" class="form-control" id="mpic" placeholder="头像">
        </div>
        <hr>
        <button type="button" id="addMember" class="btn btn-success">提交</button>
        <button type="button" id="cancleMember" class="btn btn-danger" >取消</button>
    </form>
</div>
</body>
</html>
<script type="text/javascript">
    var insertMember=function () {
        if (!check().form()) {}
    }


    function check() {
        return $("#id-form-insertMember").validate({
            rules:{
                maccount:{required:true},
                mpwd:{required:true},
                mphone:{required:true},
                mname:{required:true},
                mpic:{required:true},
            },
            messages:{
                maccount:{required:""},
                mpwd:{required:""},
                mphone:{required:""},
                mname:{required:""},
                mpic:{required:""},
            }
        });
    }
</script>